package com.cn.component;

import com.jfinal.aop.Interceptor;
import com.jfinal.aop.Invocation;
import com.jfinal.core.Controller;
public class LoginInterceptor implements Interceptor{

//	public void intercept(ActionInvocation ai) {
//		System.out.println(ai.getController().getSessionAttr("user"));
//		Controller c=ai.getController();
// 		if(c.getSessionAttr("user")!=null&&ai.getViewPath().equals("/view/login/")){
//			c.redirect("/view/index/index.jsp");
//			return;
//		}
//		if(!ai.getViewPath().equals("/view/login/")&&
//		   !ai.getViewPath().equals("/StartCapthca/")&&
//		   c.getSessionAttr("user")==null){
//			c.redirect("/view/login/login.jsp");
//		}else{
//			ai.invoke();
//		}
//	}

	@Override
	public void intercept(Invocation inv) {
		
		
	}

}
